package com.eidos.blogs.openapi.entity.seckill;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;


/**
* @author ： Eidos
* @date ：Created in 2021-01-12
* @description：红包信息表 实体类
* @modified By：
* @version: 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("rede_info")
@ApiModel(value="RedeInfo对象", description="红包信息表")
public class RedeInfo extends Model<RedeInfo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "红包唯一ID")
    @TableField("red_envelope_id")
    private Long redEnvelopeId;

    @ApiModelProperty(value = "userid")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "标题")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "红包金额单位分")
    @TableField("total_amount")
    private Long totalAmount;

    @ApiModelProperty(value = "红包个数")
    @TableField("total_num")
    private Integer totalNum;

    @ApiModelProperty(value = "红包类型1手气红包2平均红包")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "0抢完1未抢完")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "0不开启1全中2全不中")
    @TableField("open_hit")
    private Integer openHit;

    @ApiModelProperty(value = "开启全不中避开的数字")
    @TableField("hit_number")
    private String hitNumber;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "红包过期时间")
    @TableField("expire_time")
    private LocalDateTime expireTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
